[NTG-context] Re: XML processing, unwanted indentation/alignment

2024-02-15 Thread Wolfgang Schuster
e and another one after the following { in the main_name attribute) which end as multiple spaces in the output. While you can fix the problem by removing the spaces a better solution is to use the texdefinition environment to create your command, you can even use blank lines to structure the argumen

[NTG-context] Re: APA 7 and https

2023-12-17 Thread Oliver Marugg
t; rauricast...@gmail.com wrote: > >> Hi >> >> I found a solution to reach APA7 list and links. >> >> Using >> $PATH/ConTeXtPATH/tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi >> in line 1306-1312, where \starttexd

[NTG-context] Re: APA 7 and https

2023-12-16 Thread Alan Braslau via ntg-context
> in line 1306-1312, where \starttexdefinition mutable protected > btx:apa:doi \texdefinition {btx:format:goto} { > url(https://doi.org/\btxflush{doi}) > } { >\hyphenatedurl{https://\btxflush{doi}} > } > \stoptexdefinition > > Change: > url(http://dx.

[NTG-context] Re: APA 7 and https

2023-12-15 Thread rauricastone
Sorry I missed to add doi.org at hyphenatedurl, now the whole block shows: \starttexdefinition mutable protected btx:apa:doi \texdefinition {btx:format:goto} { url(https://doi.org/\btxflush{doi}) } { \hyphenatedurl{https://doi.org/\btxflush{doi}} } \stoptexdefinition

[NTG-context] Re: APA 7 and https

2023-12-15 Thread rauricastone
Hi I found a solution to reach APA7 list and links. Using $PATH/ConTeXtPATH/tex/texmf-context/tex/context/base/mkiv/publ-imp-apa.mkvi in line 1306-1312, where \starttexdefinition mutable protected btx:apa:doi \texdefinition {btx:format:goto} { url(https://doi.org/\btxflush{doi

Re: [NTG-context] Displaying names in Chicago-Turabian "note" style

2021-12-21 Thread Joey McCollum via ntg-context
eshort:author \btxdoif{author} { % If the useidem option is set and this author matches the previously cited author, then just print "idem"; % otherwise, print the author/editor's last name \doifelse{\btxparameter{useidem}} {\v!yes} { \texdefinition{btx:sbl:doifsamefoundnameaut

Re: [NTG-context] Short forms and abbreviations in bibliography

2021-10-11 Thread Joey McCollum via ntg-context
If it helps with troubleshooting, I've also tried to do this with \fastsetup instead of \texdefinition: ``` \expanded{\abbreviation[\currentbtxtag]{\fastsetup{btx:sbl:cite:shorthand}}{ \fastsetup{btx:sbl:cite:listsubcite}}} ``` This also doesn't work, but I at least get a "Missing co

Re: [NTG-context] Short forms and abbreviations in bibliography

2021-10-08 Thread Hans Hagen via ntg-context
up   \def\currentbtxcategory{\btxfield{category}}   \texdefinition{btx:sbl:inline:shorthand}   \endgroup   \removeunwantedspaces   \removepunctuation \stopsetups ... \expanded{\abbreviation[\currentbtxtag]{\textcite[alternative=shorthand,lefttext=,righttext=][\currentbtxtag]}{\textcite[alternative=l

Re: [NTG-context] Short forms and abbreviations in bibliography

2021-10-06 Thread Joey McCollum via ntg-context
A concise solution that I found would work was to define a "shorthand" citation alternative and just print the shorthand with that: ``` % Shorthand citation setup \startsetups btx:sbl:cite:shorthand \begingroup \def\currentbtxcategory{\btxfield{category}} \tex

Re: [NTG-context] Short forms and abbreviations in bibliography

2021-10-06 Thread Joey McCollum via ntg-context
. So if there is a more concise solution that applies expansion control to \texdefinition{btx:sbl:inline:shorthand}, I'd love to know it! Thanks! Joey On Wed, Oct 6, 2021 at 3:05 PM Joey McCollum wrote: > Okay, I had a follow-up question sooner than I thought! Enclosing the > \abbrev

Re: [NTG-context] Short forms and abbreviations in bibliography

2021-10-06 Thread Joey McCollum via ntg-context
Okay, I had a follow-up question sooner than I thought! Enclosing the \abbreviation command doesn't quite work when I want to typeset the abbreviated form with a \texdefinition, as follows: ``` \texdefinition{btx:sbl:doifownfield} {shorthand} { \expanded{\abbreviation[\currentbtxtag

Re: [NTG-context] Short forms and abbreviations in bibliography

2021-10-06 Thread Joey McCollum via ntg-context
i: >> >> \startsetups btx:cite:listelement >> \fastsetup{\s!btx:\s!cite:concat} >> \fastsetup{\s!btx:\s!cite:lefttext} >> \ifx\currentbtxfirst\empty >> \fastsetup{\s!btx:\s!cite:\s!empty} >> \else >>\texdefinition {\s!btx:\s!cite

Re: [NTG-context] Short forms and abbreviations in bibliography

2021-10-06 Thread Joey McCollum via ntg-context
etup{\s!btx:\s!cite:concat} > \fastsetup{\s!btx:\s!cite:lefttext} > \ifx\currentbtxfirst\empty > \fastsetup{\s!btx:\s!cite:\s!empty} > \else >\texdefinition {\s!btx:\s!cite:inject} { >\btxcitereference >\currentbtxfirst >

Re: [NTG-context] Changing the style of author’s surname in a custom bibliographical style

2021-09-15 Thread Tomáš V via ntg-context
,     ] % field definitions \starttexdefinition btx:iso690:author     \btxdoif {author} {     \btxflush{author}     \btxperiod     } \stoptexdefinition % book definition \startsetups btx:iso690:list:book     \texdefinition{btx:iso690:author}     \removeunwantedspaces \stopsetups

[NTG-context] Changing the style of author’s surname in a custom bibliographical style

2021-09-11 Thread Tomáš V via ntg-context
\starttexdefinition btx:iso690:author     \btxdoif {author} {     \btxflush{author}     \btxperiod     } \stoptexdefinition % book definition \startsetups btx:iso690:list:book     \texdefinition{btx:iso690:author}     \removeunwantedspaces \stopsetups % publ-imp-iso690.lua local specification

Re: [NTG-context] Short forms and abbreviations in bibliography

2021-08-22 Thread Joey McCollum via ntg-context
} \ifx\currentbtxfirst\empty \fastsetup{\s!btx:\s!cite:\s!empty} \else \texdefinition {\s!btx:\s!cite:inject} { \btxcitereference \currentbtxfirst } \fi \fastsetup{\s!btx:\s!cite:righttext} \stopsetups \startsetups \s!btx:\s!cite:entry \fa

[NTG-context] Last names in citations

2020-02-28 Thread Fulvio Satta
][authorconversion=normalshort] \startsetups btx:aps:cite:margin \texdefinition{btx:aps:title} \texdefinition{btx:aps:author} \doiftextelse\currentbtxrighttext{ \currentbtxrighttext } { \removeunwantedspaces \removepunctuation } this works and is perfect for my style, but I obtain

[NTG-context] Modifying the place of the year in APA.

2019-05-16 Thread Dmitry Starostin
In the publ-imp-apa.mkvi (is it already VI?) I found the key line which I would like to modify: \startsetups btx:apa:list:book \texdefinition{btx:apa:authoryear} \texdefinition{btx:apa:title-if-not-placed} ... \stopsetups This, as I understand, determines the order in which the items

Re: [NTG-context] Bibliography: I think module [aps] is rendering incorrectly the electronic category and others too

2019-03-21 Thread Alan Braslau
rong? > > Thanks in advance > Tomás > > PS. Original question was posted here: > https://tex.stackexchange.com/questions/480416/bibliography-what-is-the-correct-way-to-setup-and-invoke-the-category-electron The APS style definitions currently expect: "author", &

Re: [NTG-context] Modifying bibliography entries using lua

2018-07-23 Thread Hans Hagen
xdefinition \startsetups btx:default:list:article     \texdefinition{btx:customauthor}     \texdefinition{btx:default:title}     \texdefinition{btx:default:journal}     \texdefinition{btx:default:year}     \removeunwantedspaces     \removepunctuation     \btxperiod \stopsetups \starttext Citati

[NTG-context] Modifying bibliography entries using lua

2018-07-23 Thread Stanislav Sokolenko
')     -- tex.sprint(text) -- text remains nill     \stopluacode \stoptexdefinition \startsetups btx:default:list:article     \texdefinition{btx:customauthor}     \texdefinition{btx:default:title}     \texdefinition{btx:default:journal}     \texdefinition{btx:default:year}     \removeunwantedspaces

Re: [NTG-context] How to extend btx rendering?

2016-07-18 Thread Henri Menke
ivePrefix}: > } > \btxflush{eprint} > \btxstopstyleandcolor > } > \stoptexdefinition > > \startsetups btx:aps:list:article > \texdefinition{btx:aps:author} > \texdefinition{btx:aps:optional-title} > \texdefinition{btx:ap

[NTG-context] How to extend btx rendering?

2016-07-18 Thread Henri Menke
{archivePrefix}: } \btxflush{eprint} \btxstopstyleandcolor } \stoptexdefinition \startsetups btx:aps:list:article \texdefinition{btx:aps:author} \texdefinition{btx:aps:optional-title} \texdefinition{btx:aps:doi-url} {\texdefinition{btx:aps:journal-volume-year

Re: [NTG-context] Unexpanded texdefinition produces “Undefined control sequence”

2013-08-26 Thread Hans Hagen
On 8/25/2013 9:09 PM, Marco Patzer wrote: On 2013–08–25 Wolfgang Schuster wrote: The \starttexdefintion command looks for the “unexpanded” keyword only when you apply also a argument but not when the arguments are missing, i.e. Thanks for the explanation. Is that a bug or expected behaviour?

Re: [NTG-context] Unexpanded texdefinition produces “Undefined control sequence”

2013-08-26 Thread Marco Patzer
On 2013–08–26 Hans Hagen wrote: not a bug ... just not implemented (as it's pretty complex to do that case efficiently at the tex end) anyhow, as it seems to be needed, i redid the code and now we have: […] so, three optional qualifiers (also in that order), so you'd better wikify it

[NTG-context] Unexpanded texdefinition produces “Undefined control sequence”

2013-08-25 Thread Marco Patzer
Hi, the following example produces an “Undefined control sequence” error. If \def is used instead of \starttexdefinition then there is no error. Why? \starttexcode \installcommandhandler{foo}{foo}{foo} \appendtoks \setuevalue{start\currentfoo}{\foo@start[\currentfoo]}%%

Re: [NTG-context] Unexpanded texdefinition produces “Undefined control sequence”

2013-08-25 Thread Wolfgang Schuster
Am 25.08.2013 um 19:40 schrieb Marco Patzer li...@homerow.info: Hi, the following example produces an “Undefined control sequence” error. If \def is used instead of \starttexdefinition then there is no error. Why? The \starttexdefintion command looks for the “unexpanded” keyword only when

Re: [NTG-context] Unexpanded texdefinition produces “Undefined control sequence”

2013-08-25 Thread Marco Patzer
On 2013–08–25 Wolfgang Schuster wrote: The \starttexdefintion command looks for the “unexpanded” keyword only when you apply also a argument but not when the arguments are missing, i.e. Thanks for the explanation. Is that a bug or expected behaviour? I think it's odd that

Re: [NTG-context] Unexpanded texdefinition produces “Undefined control sequence”

2013-08-25 Thread Wolfgang Schuster
Am 25.08.2013 um 21:09 schrieb Marco Patzer li...@homerow.info: On 2013–08–25 Wolfgang Schuster wrote: The \starttexdefintion command looks for the “unexpanded” keyword only when you apply also a argument but not when the arguments are missing, i.e. Thanks for the explanation. Is that a

Re: [NTG-context] the difference between \def and \define

2013-04-16 Thread Marco Patzer
, \setvalue or texdefinition are being used and \define for in-document markup, wherefore numbered parameters are perfectly fine. The only thing that could be improved is a definition which doesn't interfere with \asciimode, but that's low priority and can easily be worked around. Marco

Re: [NTG-context] the difference between \def and \define

2013-04-16 Thread Hans Hagen
with \define. For modules most likely \def, \setvalue or texdefinition are being used and \define for in-document markup, wherefore numbered parameters are perfectly fine. The only thing that could be improved is a definition which doesn't interfere with \asciimode, but that's low priority and can

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Wolfgang Schuster
is grabbed. Seems like a bug or is this by design? When you use the texdefinition environment to create a command the end of line character which results normally in a space is ignored sees “thenelseend” as a single string, in such a case you can add a space and put a comment sign at the end of the line

Re: [NTG-context] Lua conditionals fail inside \starttexdefinition

2012-09-04 Thread Aditya Mahajan
with how the content of a texdefinitions is grabbed. Seems like a bug or is this by design? When you use the texdefinition environment to create a command the end of line character which results normally in a space is ignored sees “thenelseend” as a single string, in such a case you can add a space